<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>

<div id="common_nav">
    <nav class="navbar navbar-expand-lg navbar-light fixed-top" id="mainNav">
        <div class="container">
            <a class="navbar-brand" href="index">Blog博客</a>
            <div class="collapse navbar-collapse" id="navbarResponsive">
                <ul class="navbar-nav ml-auto">
                    <li class="nav-item">
                        <a class="nav-link" href="#">你好！亲爱的 [[${session.user.name}]]</a>
                    </li>
                    <li class="nav-item dropdown">
                        <a href="#" class="nav-link dropdown-toggle" data-toggle="dropdown">
                            分类
                            <b class="caret"></b>
                        </a>
                        <ul class="dropdown-menu">
                            <div th:each="type:${typeList}">
                                <li class="nav-item"><a class="nav-link text-muted" th:href="@{showByType(typeID=${type.getNid()})}" th:text="${type.getName()}"></a></li>
                            </div>
                        </ul>
                    </li>
                    <li class="nav-item dropdown">
                        <a href="#" class="nav-link dropdown-toggle" data-toggle="dropdown">
                            标签
                            <b class="caret"></b>
                        </a>
                        <ul class="dropdown-menu">
                            <div th:each="tag:${tagList}">
                                <li class="nav-item bg-muted"><a class="nav-link text-muted" th:href="@{showByTag(tagID=${tag.getNid()})}" th:text="${tag.getName()}"></a></li>
                            </div>
                        </ul>
                    </li>
                    <li class="nav-item">
                        <a class="nav-link" href="info">个人主页</a>
                    </li>
                    <li class="nav-item">
                        <a class="nav-link" href="edit">发表博客</a>
                    </li>
                    <li class="nav-item">
                        <a class="nav-link" href="logout">登出<span class="glyphicon glyphicon-log-in"></span></a>
                    </li>
                </ul>
            </div>
        </div>
    </nav>
</div>


</body>
</html>
